package Utils;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * created by zhangyuhang on 2018/7/13
 */
public class ReadTxt {

    public static List<String> read(String filePath) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filePath)));
        StringBuffer buffer = new StringBuffer();
        String line = "";
        List<String> list = new ArrayList<String>();
        while((line = br.readLine())!=null){
            list.add(line.trim());
        }
        br.close();
        return list;
    }


    public static void main(String[] args) throws IOException {
        List<String> list = read("/Users/zhangyuhang/Desktop/wk/youzantest/seleniumtest/src/main/resources/picid.txt");
        for (String a:list){
            System.out.print("\""+a+"\""+",");
        }

    }

}
